package com.itheima.reggie.service;

import com.github.pagehelper.PageInfo;
import com.itheima.reggie.common.PageBean;
import com.itheima.reggie.common.R;
import com.itheima.reggie.entity.Employee;

import java.util.List;

/**
 * 员工管理业务层
 * @author Asin
 */
public interface EmployeeService {

    /**
     * 员工登录
     * @param employee
     * @return
     */
    R<Employee> login(Employee employee);

    /**
     * 分页查询
     * @param page
     * @param pageSize
     * @return
     */
    R<PageBean> findByPage(int page, int pageSize,String name);

    /**
     * 新增员工
     * @param employee
     * @return
     */
    R<String> addEmployee(Employee employee);

    /**
     * 修改员工状态
     * @param employee
     * @return
     */
    R<String> updateEmployee(Employee employee);

    /**
     * 通过id获取员工信息
     * @param id
     * @return
     */
    R<Employee> findEmployeeById(int id);
}
